﻿Public Class winOver

    Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
        End
    End Sub

    Private Sub winOver_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
        txtZZZ.Text = ZZZ

        Dim txtDartList As txtArray = New txtArray()
        Dim txtMultipleList As txtArray = New txtArray()
        Dim txtTorFList As txtArray = New txtArray()
        Dim txtZhtList As txtArray = New txtArray()

        If AB = 0 Then
            '单选题
            For i As Int16 = 1 To 40
                Dim the_txt As TextBlock = New TextBlock()
                txtDartList.Add(the_txt)
                the_txt.Name = "Dart" & i
                the_txt.Text = i & ":" & arrStringDart(i, 7) & "--答案:" & arrStringDart(i, 6)
                If arrStringDart(i, 7) <> arrStringDart(i, 6) Then
                    the_txt.Foreground = Brushes.Red
                End If
                the_txt.Margin = New Thickness(5)
                the_txt.Padding = New Thickness(1)
                the_txt.Visibility = Windows.Visibility.Visible
                wpD.Children.Add(the_txt)
            Next

            '多选题
            For i As Int16 = 1 To 20
                Dim the_txt As TextBlock = New TextBlock()
                txtMultipleList.Add(the_txt)
                the_txt.Name = "Multiple" & i
                the_txt.Text = i & ":" & arrStringMultiple(i, 8) & "--答案:" & arrStringMultiple(i, 7)
                If arrStringMultiple(i, 8) <> arrStringMultiple(i, 7) Then
                    the_txt.Foreground = Brushes.Red
                End If
                the_txt.Margin = New Thickness(5)
                the_txt.Padding = New Thickness(1)
                the_txt.Visibility = Windows.Visibility.Visible
                wpM.Children.Add(the_txt)
            Next

            '判断题
            For i As Int16 = 1 To 20
                Dim the_txt As TextBlock = New TextBlock()
                txtTorFList.Add(the_txt)
                the_txt.Name = "TorF" & i
                the_txt.Text = i & ":" & arrStringTorF(i, 6) & "-- 答案:" & arrStringTorF(i, 5)
                If arrStringTorF(i, 6) <> arrStringTorF(i, 5) Then
                    the_txt.Foreground = Brushes.Red
                End If
                the_txt.Margin = New Thickness(5)
                the_txt.Padding = New Thickness(1)
                the_txt.Visibility = Windows.Visibility.Visible
                wpT.Children.Add(the_txt)
            Next

        Else
            '多选题
            For i As Int16 = 1 To 15
                Dim the_txt As TextBlock = New TextBlock()
                txtMultipleList.Add(the_txt)
                the_txt.Name = "Multiple" & i
                the_txt.Text = i & ":" & arrStringMultiple(i, 8) & "--答案:" & arrStringMultiple(i, 7)
                If arrStringMultiple(i, 8) <> arrStringMultiple(i, 7) Then
                    the_txt.Foreground = Brushes.Red
                End If
                the_txt.Margin = New Thickness(5)
                the_txt.Padding = New Thickness(1)
                the_txt.Visibility = Windows.Visibility.Visible
                wpM.Children.Add(the_txt)
            Next

            '判断题
            For i As Int16 = 1 To 20
                Dim the_txt As TextBlock = New TextBlock()
                txtTorFList.Add(the_txt)
                the_txt.Name = "TorF" & i
                the_txt.Text = i & ":" & arrStringTorF(i, 6) & "-- 答案:" & arrStringTorF(i, 5)
                If arrStringTorF(i, 6) <> arrStringTorF(i, 5) Then
                    the_txt.Foreground = Brushes.Red
                End If
                the_txt.Margin = New Thickness(5)
                the_txt.Padding = New Thickness(1)
                the_txt.Visibility = Windows.Visibility.Visible
                wpT.Children.Add(the_txt)
            Next

            '综合题
            For i As Int16 = 1 To 5
                For j As Int16 = 1 To 5
                    Dim the_txt As TextBlock = New TextBlock()
                    txtZhtList.Add(the_txt)
                    the_txt.Name = "Zht" & i & j
                    the_txt.Text = i & "-" & j & ":" & arrComprehensive(i, j, 6) & "--答案:" & arrComprehensive(i, j, 5)
                    If arrComprehensive(i, j, 6) <> arrComprehensive(i, j, 5) Then
                        the_txt.Foreground = Brushes.Red
                    End If
                    the_txt.Margin = New Thickness(5)
                    the_txt.Padding = New Thickness(1)
                    the_txt.Visibility = Windows.Visibility.Visible
                    wpD.Children.Add(the_txt)
                Next
            Next
        End If


    End Sub
End Class
